<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
</head>
<body>
    
    <input id="n1" type="text">
    <select id="opt" name="" id="">
        <option value="+">+</option>
        <option value="-">-</option>
        <option value="*">*</option>
        <option value="/">/</option>
    </select>
    <input id="n2" type="text">
    <button  onclick="count()">=</button>
    <input id="res" type="text" onclick="count()">


</body>
<script>
    function count(){
        var a=parseInt( document.getElementById("n1").value);
        var b=parseInt( document.getElementById("n2").value);
        var opt=document.getElementById("opt").value
        switch(opt){
            case "+":anwers=a+b;break;
            case "-":anwers=a-b;break;
            case "*":anwers=a*b;break;
            case "/":anwers=a/b;
        }
        document.getElementById("res").value=anwers;

        }
</script>
</html>